<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 使用v-for进行循环渲染数据，数据需要根据展示结构进行模拟 -->
        <ul>
            <li v-for="item in arr">
                <h1>{{item.type}}</h1>
                <ol>
                    <li v-for="value in item.subMenu">{{value.name}}</li>
                </ol>e
            </li>
        </ul>
    </div>
</body>

</html>
<script src="js/vue3.4.21.js"></script>
<script>
    const {
        createApp,
        ref
    } = Vue
    createApp({
        setup() {
            const arr = ref([{
                    type: "凉菜",
                    subMenu: [{
                        id: 1,
                        name: "凉拌黄瓜"
                    }, {
                        id: 2,
                        name: "皮蛋豆腐"
                    }]
                }, {
                    type: "炒菜",
                    subMenu: [{
                        id: 1,
                        name: "红烧肉"
                    }, {
                        id: 2,
                        name: "西红柿炒鸡蛋"
                    }]
                }, {
                    type: "汤",
                    subMenu: [{
                        id: 1,
                        name: "玉米排骨汤"
                    }, {
                        id: 2,
                        name: "醪糟圆子汤"
                    }]
                },

            ])
            return {
                arr
            }
        }
    }).mount("#app")
</script>